test(chat): check the renderer warning's anchor against the guide it links to - #3602
Conversation
…links to The missing-Markdown-renderer warning deep-links to a section of the chat-ui guide. The test that guards that link asserted the whole URL against a second copy of the same string, so it could only catch someone editing the constant -- never someone renaming the heading the fragment names. A fragment that names no heading does not 404; the reader silently lands at the top of the article, so nothing else catches it either. Resolve the published URL back to the repository file it is published from and assert the fragment against that file's headings. Renaming the section now fails here, and the failure lists the headings that do exist. Resolve the doc path from import.meta.url rather than the process cwd: test files share one process under --parallel and src/testing/cwd.ts chdirs it.
|
Warning Review limit reached
Next review available in: 16 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
Comment |
Companion to veryfront/veryfront-docs#371. Dogfooding round 2, finding 8.
The finding, and why the previous fix did not close it
A chat surface without a Markdown renderer logs a warning whose only escape hatch is a deep link. Round 1 fixed the path half of that link --
/docs/guides/chat-uiwas a genuine 404, and/docs/code/guides/chat-uiis not. Verification against published0.1.1229showed the symptom had only half moved:The fragment names no heading on the published page. Unlike a bad path, a bad fragment does not 404 -- the browser silently leaves the reader at the top of the article -- so nothing surfaced it.
The framework's string is not wrong.
docs/guides/chat-ui.md, the file that page is published from, has carried## Render Markdown in chatsince #3358. The published page is a 2026-08-02 snapshot that predates it, because veryfront-docs' sync workflow has failed on every run since (details in the docs PR). The content fix belongs in veryfront-docs, and is there. Nothing about the emitted URL needs to change here.What this changes
The test guarding that link, only.
It asserted the whole URL against a second copy of the same string:
That can catch someone editing the constant. It cannot catch someone renaming the heading the fragment names -- the exact drift this finding is about -- because the heading is not part of what it compares. Its doc comment claimed the fragment "has to track the heading in this repo's
docs/guides/chat-ui.md", but nothing enforced it.So resolve the published URL back to the repository file it is published from, and assert the fragment against that file's headings. Same shape as the check #3589 added for error docs links.
Confirmed it fails for the right reason by renaming the heading to what the published page currently has:
The doc path resolves from
import.meta.url, not the process cwd: test files share one process under--parallelandsrc/testing/cwd.tschdirs it.lint:cwd-relative-test-readspasses with no new baseline entry.Scope
No runtime change, so nothing to verify against a build. The published-artifact proof for this finding is the live page, and it is recorded on the docs PR:
https://veryfront.com/docs/code/guides/chat-ui#render-markdown-in-chat must scroll to a "Render Markdown in chat" heading once veryfront/veryfront-docs#371 is live.
Not fixed here
veryfront-docs'
update-referencesync has failed on every run since 2026-08-02, so no code doc merged since then has reached the site. Its quality gate runs after the copy and before the PR, so one non-compliant file blocks delivery of all of them, and the 13 issues it reports live indocs/**in this repository. That is very likely why several round-1 doc fixes never appeared live. It needs its own issue; the offending files are other findings' territory.